Optical information reading apparatus

ABSTRACT

An optical information reading apparatus applies light to an object to be read such as a bar code symbol, photoelectrically converts by a photodetector element a light image formed by the reflection light, and processes the obtained electric signal to output code data. Among the portions performing the signal processing, at least a data converter ( 13 ) for converting a photoelectrically converted electric signal into a digital signal, a digital signal calculation unit ( 17 ) for calculating the digital signal and generating code data indicating information of an object to be read, an input accumulation unit ( 20 ) for accumulating the code data, and a timing control unit ( 12 ) for controlling operation timings of these components are arranged on a single substrate as a multipurpose processing circuit block ( 10 ).

TECHNICAL FIELD

The present invention relates to an optical information processingapparatus that optically reads information of an object to be readhaving portions with different light reflectances and outputs code dataindicating the information of the object to be read and, morespecifically, to an optical information reading apparatus suitable for abar code reader that reads a barcode symbol.

BACKGROUND TECHNOLOGY

Generally widely used optical information reading apparatuses such as abar code reader and the like include an apparatus using a light emittingdiode (LED) as a light source, using a CCD image sensor as aphotodetector element to perform photoelectrical conversion, andprocessing a resulting converted electric signal, an apparatus usinglaser light as a light source, receiving and photoelectricallyconverting reflected light of the laser light, and processing aresulting electric signal, and so on.

These optical information reading apparatuses are typically configuredas shown in FIG. 43. Specifically, an optical information readingapparatus 100 comprises a light emitting block 101 having a light sourcesuch as an LED, a semiconductor laser, or the like, a light receivingblock 102 composed of a CCD image sensor or the like, and a signalprocessing block 103.

The light emitting block 101 projects light to an object to be read 200having portions with different light reflectances such as a bar codesymbol 201 or the like, the light receiving block 102 receives reflectedlight from the object to be read 200 and photoelectrically converts it,the signal processing block 103 processes a resulting electric signal,recognizes information of the bar code or the like, and sends its codedata to a host apparatus 300 such as a personal computer or the like.

The signal processing block 103 comprises an amplification circuit 104,a binarization circuit 105, a decoder 106, and an interface 107.Conventionally, a signal has generally been subjected to analogprocessing in the amplification circuit 104 and the binarization circuit105, and to digital processing in the decoder 106 and the interface 107.

The decoder 106 recognizes a bar code or the like, converts it into codedata, and sends the data to the host apparatus 300 via the interface107.

Such an optical information reading apparatus 100 using an LED as thelight source of the light emitting block 102 and using a CCD imagesensor as the light receiving block 102 is found, for example, in JPH6-187480 A.

Further, an optical information reading apparatus similarly using a CCDimage sensor as a light receiving block, in which a calculation circuitblock being a signal processing block for processing an electric signalwhich has been photoelectrically converted in the light receiving blockincludes a logarithmic amplifier, a slice signal generation circuit, anda comparison circuit so as to enable control capable of quicklyresponding to a transient or instantaneous change of disturbance lightwhile maintaining wide dynamic range characteristics, thereby readingaccurate optical information, is found in JP H6-195496 A.

Besides, an optical information reading apparatus using a laser lightsource such as a semiconductor laser as a light source of a lightemitting block is found, for example, in JP H11-259592 A. Also in theoptical information reading apparatus, signal processing afterphotoelectric conversion in a light receiving block is analog processingthrough use of an amplification circuit and a binarization circuit andthereafter digital processing in a decoder and an interface.

The signal processing in the above-described conventional opticalinformation reading apparatuses, however, have the following problems:

-   -   {circle around (1)} the processing performance tends to vary        with a change in amplification rate, temperature, or the like;    -   {circle around (2)} when a signal to be binarized in the        binarization circuit is subjected to analog processing, the        processing performance tends to vary due to variations of parts        of the binarization circuit; and    -   {circle around (3)} the conventional optical information reading        apparatus including the processing circuit of this kind has a        large number of parts and therefore tends to cause variations in        accuracy of quality, have a relatively large size, and increase        in cost.

The present invention is made to solve those problems, and an object ofthe invention is to improve the signal processing performance in theabove-described optical information reading apparatus, so as to increasethe reliability of reading information such as a bar code symbol or thelike being an object to be read and, in addition, to realize a reductionin size and cost of the reading apparatus.

As more specific points, the invention has the following objects:

-   -   {circle around (1)} to eliminate variations in processing        performance by avoiding influence of variable factors such as a        change in amplification rate, temperature, and so on;    -   {circle around (2)} to eliminate variations in processing        performance by reducing the number of parts of a processing        circuit;    -   {circle around (3)} to improve reading performance by avoiding        influence of the printing quality (gradation or the like) of a        bar code symbol or the like being an object to be read;    -   {circle around (4)} to reduce size and manufacturing cost of the        optical information reading apparatus itself;    -   {circle around (5)} to enable easy selection of various kinds of        digital processing by employing a new calculation circuit        (multipurpose processing circuit); and    -   {circle around (6)} to reduce voltage and power consumption of        the calculation circuit block.

DISCLOSURE OF THE INVENTION

To achieve the above-described objects, the invention is an opticalinformation reading apparatus, comprising: a light projection means forprojecting light to an object to be read having portions with differentlight reflectances; an optical system for forming an image of reflectedlight from the object to be read on a light receiving position; aphotoelectric conversion means located at the light receiving positionfor photoelectrically converting the light image made of the reflectedlight and outputting an electric signal; and a calculation means forcalculating the electric signal outputted from the photoelectricconversion means and outputting bar code binarized data indicatinginformation of the object to be read, wherein the calculation means isconfigured as follows:

The calculation means forms a multipurpose processing circuit byintegrally providing, on a single substrate, the following (a) to (d):

-   -   (a) a data conversion unit for converting the electric signal        into a digital signal;    -   (b) a digital signal calculation unit having a calculation        processor for calculating the digital signal converted by said        data converter and generating bar code binarized data, a data        correction section for correcting the bar code binarized data,        and a noise reduction section for reducing the noise, for        outputting the bar code binarized data indicating information of        the object to be read;    -   (c) an input accumulation unit for accumulating the bar code        binarized data output from said digital signal calculation unit;        and    -   (d) a timing control unit for controlling operation timings of        the light projection means, the photoelectric conversion means,        the data conversion unit, the digital signal calculation unit,        and the input accumulation unit.

It is preferable that the multipurpose processing circuit is integrallyformed on the single substrate while also including a central processingunit (CPU) for centrally controlling respective units of the calculationmeans.

Further, it is possible that the calculation unit of the opticalinformation reading apparatus comprises: a first calculation processorfor calculating the digital signal converted by the data conversionunit; a second calculation processor for generating the bar codebinarized data from data calculated by the first calculation processor.

Further, it is possible that a processing circuit of the firstcalculation processor comprises an integration circuit, and a processingcircuit of the second calculation processor comprises a differentiationcircuit and a binarization circuit.

In this case, it is preferable that at least one of the firstcalculation processor and the second calculation processor is providedwith one or more of following {circle around (1)} to {circle around(6)}:

-   -   {circle around (1)} means for varying a differential time (Δt)        in the differentiation circuit of the second calculation        processor;    -   {circle around (2)} means for eliminating or reducing noise;    -   {circle around (3)} means for minimizing a difference in total        data due to buffer selection;    -   {circle around (4)} means for eliminating noise components by        comparison with an analog signal;    -   {circle around (5)} means for erasing binary data with an        arbitrary pulse width or less; and    -   {circle around (6)} means for forcibly resetting binary data at        a high level (“H”) continuing for a predetermined length or        longer.

Alternatively, it is adoptable that a processing circuit of the firstcalculation processor comprises a moving average circuit, and aprocessing circuit of the second calculation processor comprises abinarization circuit.

In this case, it is desirable that the first calculation processor isprovided with plural means of following (1) to (10):

-   -   (1) means for changing a moving average sampling width;    -   (2) means for taking a weighted moving average;    -   (3) means for separating the moving average circuit into two        parts;    -   (4) means for changing a weighted amount of a weighted moving        average;    -   (5) means for changing frequency response of a weighted moving        average;    -   (6) means for selecting a maximum value or a minimum value in        moving average sampling data;    -   (7) means for thinning out moving average sampling data;    -   (8) means for interpolating moving average sampling data;    -   (9) means for reducing a total of high frequency components from        a total of low frequency components in a weighted moving        average; and    -   (10) means for changing M (a total divisor) of a weighted moving        average.

In contrast to the conventional optical information reading apparatus inwhich processing until binarization processing (converting gradationssuch as black and white printed data of a bar code symbol into a digitalsignal composed of “1” and “0”) is implemented by analog processing, theoptical information reading apparatus according to the invention isconfigured such that analog processing is performed on aphotoelectrically converted electric signal in a very limited part, andA/D conversion, binarization processing, decoding, interface processingare implemented by digital processing by the multipurpose processingcircuit which is formed on a single substrate, thereby achieving theabove-described objects.

It should be noted that the “substrate” in the invention includes notonly a substrate of a printed circuit board but also a semiconductorsubstrate on which a semiconductor integrated circuit (IC or LSI) isformed.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic sectional side view showing an example of anoptical information reading apparatus according to the invention usingan LED as a light emitting block;

FIG. 2 is a schematic sectional plan view showing an example of anoptical information reading apparatus according to the invention using alaser light source as a light emitting block;

FIG. 3 is a block diagram showing an example of an entire configurationof a signal processing block in the optical information readingapparatus shown in FIG. 1 according to the invention;

FIG. 4 is a block diagram showing an internal configuration of amultipurpose processing circuit block in FIG. 3;

FIG. 5 is a block diagram showing a configuration example of a digitalsignal calculation unit (DSCU) in FIG. 4;

FIG. 6 is a block diagram showing a specific configuration example of afirst calculation processor in FIG. 5;

FIG. 7 is a block diagram showing a specific configuration example of asecond calculation processor in FIG. 5;

FIG. 8 is a block diagram showing a specific configuration example of areset section in FIG. 5;

FIG. 9 is a block diagram showing a specific configuration example of adata correction section in FIG. 5;

FIG. 10 is a block diagram showing a specific configuration example of anoise reduction section in FIG. 5;

FIG. 11 is a block diagram showing another configuration example of thedigital signal calculation unit (DSCU) in FIG. 4;

FIG. 12 is a diagram for explaining a differential expression;

FIG. 13 is a diagram showing characteristics of a high-pass filter;

FIG. 14 is a waveform chart showing analog bar code data when a low-passfilter is provided as a noise filter in FIG. 11, and binarized datathereof;

FIG. 15 is a diagram showing characteristics of the same low-passfilter;

FIG. 16 is a diagram showing characteristics obtained by combining thecharacteristics of the high-pass filter in FIG; 13 and thecharacteristics of the low-pass filter in FIG. 15;

FIG. 17 is a conceptual diagram of low-pass output adjustment in thelow-pass filter section;

FIG. 18 is a waveform chart showing a correction example of bar codebinarized data by a data correction section in FIG. 11;

FIG. 19 is a waveform chart showing a noise elimination example by thenoise reduction section shown in FIG. 10;

FIG. 20 is a waveform chart showing an example of forcible reset of barcode binarized data by the reset section shown in FIG. 8;

FIG. 21 is a block diagram showing basic circuit configurations of onlya first calculation processor and a second calculation processor in adigital signal calculation unit of a multipurpose processing circuitblock in another embodiment of the optical information reading apparatusaccording to the invention;

FIG. 22 is a waveform chart showing the relationship between an originalsignal (input signal) and a signal made by multiplying the originalsignal by a moving average and bar code binarized data when the bar codebinarized data is generated using a moving average circuit;

FIG. 23 is a block configuration diagram illustrating the principle of asimple moving average;

FIG. 24 is a block configuration diagram illustrating the principle of aweighted moving average;

FIG. 25 is a block diagram showing an example in which the function ofthe first calculation processor in the embodiment shown in FIG. 21 isimproved;

FIG. 26 is a waveform chart of an input signal and a signal made bymultiplying the input signal by a weighted moving average beforechanging a weighted amount when a weighted moving average method isemployed;

FIG. 27 is a waveform chart of the input signal and a signal made bymultiplying the input signal by the weighted moving average afterchanging the weighted amount in the same case as in FIG. 26;

FIG. 28 is a waveform chart of an input signal and a signal made bymultiplying the input signal by a weighted moving average beforechanging frequency characteristics when the weighted moving averagemethod is employed;

FIG. 29 is a waveform chart of the input signal and a signal made bymultiplying the input signal by the weighted moving average afterchanging the frequency characteristics in the same case as in FIG. 28;

FIG. 30 is a waveform chart of a signal made by multiplying input databy a weighted moving average which has passed through a maximum valuecircuit in the case of addition of a function of selecting amaximum/minimum value in sample data when the weighted moving averagemethod is employed;

FIG. 31 is a waveform chart of a signal made by multiplying input databy a weighted moving average which has passed through a minimum valuecircuit in the same case as in FIG. 30;

FIG. 32 is a conceptual diagram for explaining a sample datathinning-out function;

FIG. 33 is a diagram for explaining a sample data interpolatingfunction;

FIG. 34 is a waveform chart showing an original signal and a signal madeby multiplying the original signal by a weighted moving average when ahighly weighting stage is added in the case of addition of a function ofreducing the total of high frequency components from the total of lowfrequency components in the weighted moving average method;

FIG. 35 is a waveform chart showing the original signal and a signalmade by multiplying the original signal by the weighted moving averagewhen the highly weighting stage is reduced in the same case as in FIG.34;

FIG. 36 is a waveform chart of signals made by multiplying input data bya weighted moving average when M (the total divisor) of the weightedmoving average is changed;

FIG. 37 is a waveform chart of bar code data when an amplification rateis high and binarized data thereof, for explaining the effect on thevariations in the amplification rate according to the invention;

FIG. 38 is a waveform chart when the amplification rate is low in thesame case as in FIG. 37;

FIG. 39 is a waveform chart of bar code data in the case of a hightemperature and binarized data thereof, for explaining the effect on achange in temperature according to the invention;

FIG. 40 is a waveform chart in the case of a low temperature in the samecase as in FIG. 39;

FIG. 41 is a waveform chart of bar code data when the printing densityis low and binarized data thereof, for explaining the effect of notbeing affected by the printing quality of a bar code symbol according tothe invention;

FIG. 42 is a waveform chart when the printing density is high in thesame case as in FIG. 41; and

FIG. 43 is a block diagram showing a configuration example of aconventional optical information reading apparatus.

BEST MODE FOR CARRYING OUT THE INVENTION

Embodiments of an optical information reading apparatus according to theinvention will be specifically described below with reference to thedrawings.

FIG. 1 is a schematic sectional side view showing an example of theoptical information reading apparatus for reading a bar code symbolaccording to the invention, in which a light emitting diode (LED) isused as a light source of a light emitting block. The opticalinformation reading apparatus includes an LED 2 being a light source asa light projection means, a reflector (mirror) 3, a slit 4, an imagingoptical system 5 such as a lens and so on, a photodetector element (CCDimage sensor) 6 being a photoelectric conversion means, and a signalprocessing block 7, which are provided in a case 1 in a shape with abent at a tip portion having an opening.

The LED 2 is located at a position close to the tip opening portion ofthe case 1 and directly projects light to a bar code symbol 201 havingportions with different light reflectances of an object to be read 200.The reflector 3 is located near the bent portion in the case 1 andreceives and deflects reflected light from the bar code symbol 201, thereflected light being made of the light projected by the LED 2, to makethe deflected light incident on the imaging optical system 5 through theslit 4. The imaging optical system 5 forms an image of the bar codesymbol 201 on a light receiving surface of the photodetector element 6.The photodetector element 6 composed of the CCD image sensor convertsthe gradation of the image into an electric signal and inputs the signalinto the signal processing block 7.

The signal processing block 7, which is composed of an analog processingblock 7 a and a digital processing block 7 b, performs analog anddigital processing of the electric signal photoelectrically converted bythe photodetector element 6, recognizes the bar code symbol, andtransmits its code data to the host apparatus.

Unlike the above-described conventional signal processing block, thesignal processing block 7 of this optical information reading apparatusis characterized in that an amplification circuit for amplifying theelectric signal photoelectrically converted by the photodetector element6 and a part of an A/D converter for converting the analog electricsignal into a digital signal are configured as the analog processingblock 7 a, and processing circuits such as the other portion of the A/Dconverter, a binarization unit, a decoder, and an interface areconfigured as the digital processing block 7 b through use of amultipurpose processing circuit formed on a single substrate.

The single substrate may be a substrate of a printed circuit board or asemiconductor substrate on which a semiconductor integrated circuit (ICor LSI) is formed.

FIG. 2 is a schematic sectional plan view showing another example of theoptical information reading apparatus according to the invention, inwhich a laser light source is used as a light source of a light emittingblock being a light projection means. This optical information readingapparatus also includes a laser light source 8 for projecting a laserbeam by light emission of a semiconductor laser through a collimate lensor a slit, a reflector 3 a, a swinging reflector 3 b, a return reflector3 c, and light receiving units 9 a and 9 b including photodetectorelements, which are provided near a tip portion in a case 1′ in a shapewith a bent at the tip portion, similarly to the case 1 shown in FIG. 1as seen form the side, and includes a signal processing block 7′ whichis provided behind those components in the case 1′.

The laser beam projected from the laser light source 8 is reflected bythe reflector 3 a to the swinging mirror 3 b so that the laser beam isscanned by swing of the swinging mirror 3 b to scan a bar code symbol ofa not-shown object to be read via the return mirror 3 c. The lightreceiving units 9 a and 9 b receive and photoelectrically convertreflected light from the bar code symbol, and input a resulting electricanalog signal into the signal processing block 7′.

The signal processing block 7′, which is composed of, similarly to thesignal processing block 7 shown in FIG. 1, an analog processing block 7a′ and a digital processing block 7 b′, performs analog and digitalprocessing of the electric signal photoelectrically converted byphotodetector elements 6, recognizes the bar code symbol, and transmitsits code information to a host apparatus such as a micro-computer or thelike.

The configurations and functions of the analog processing block 7 a′ andthe digital processing block 7 b′ are the same as those of the analogprocessing block 7 a and the digital processing block 7 b of the signalprocessing block 7 shown in FIG. 1.

FIG. 3 is a block diagram showing an example of an entire configurationof the signal processing block in the optical information readingapparatus shown in FIG. 1 according to the invention, and FIG. 4 is ablock diagram showing an internal configuration of a multipurposeprocessing circuit block thereof. In a multipurpose processing circuitblock 10, respective components explained below are integrally providedon a single substrate to form a single printed circuit board orsemiconductor integrated circuit.

The configuration of the multipurpose processing circuit block 10 shownin FIG. 4 is explained first. The multipurpose processing circuit block10 is composed of a central processing unit (CPU) 11 as a center, atiming control unit 12, a data converter (ADC) 13 composed of an A/Dconversion circuit, a digital signal calculation unit (DSCU) 17, aninput accumulation unit 20, an SRAM(A) 21 and an SRAM(B) 22, an SRAM(C)23 for operation of the CPU 11, and a watchdog timer (WDT) 24 forinputting/outputting and managing respective characteristics and data, aprogrammable timer 25 for monitoring operation of each function in termsof time and issuing a command, a UART (asynchronous serial communicationtransmitter/receiver circuit) 26 being an interface, a serial interface(SCI) 27, a serial interface for debug (DSCI) 28, an interface (WEDGE)29, a general-purpose I/O port (GPIO) 30, a clock pulse generator (OSC)31, and buffer groups 40 and 41, which are connected to the CPU 11.These circuits are integrally formed on a single substrate.

The digital signal calculation unit (DSCU) 17 comprises a firstcalculation processor 14 that is, for example, an integration circuit, asecond calculation processor 15 that comprises, for example, adifferentiation circuit and a binarization circuit, and a datacorrection section 16. The input accumulation unit 20 comprises acontroller for SRAM 18 and a calculator for SRAM 19.

To the multipurpose processing circuit block 10, various externalcircuits and so on are connected as shown in FIG. 3. Referring to FIG. 3and FIG. 4, the timing control unit 12 controls the LED 2 for projectinglight and the CCD image sensor 6, so that an analog electric signalphotoelectrically converted by the CCD image sensor 6 is inputted intothe data converter 13 via a filter 42, an amplifier 43, and a gainadjuster 44.

To the general-purpose I/O port (GPIO) 30, a buzzer 38 and aconfirmation LED 39 are connected.

To the central processing unit 11 shown in FIG. 4, the timing controlunit 12, the buffer groups 40 and 41, the SRAMs 21, 22, and 23, thewatchdog timer (WDT) 24, the programmable timer 25, the interfaces 26 to29, and the I/O port (GPIO) 30, which are internal components, areconnected via a CPU bus 45 composed of data buses, address buses, andcontrol buses respectively shown by thick lines, medium lines and thinlines, and a FROM 47 and a high-speed USB (universal system bus) 46,which are external parts, are also connected.

Further, a CMOS 32 and an RS-232-C driver 33 for driving an RS-232-C 48are connected to the UART 26 being an interface, a low-speed USBadjuster 34 and an OCIA (optical coupled interface adopter) 35 areconnected to the serial interface (SCI) 27, and a personal computer (PC)36 and a keyboard (KB) 37 are connected to the interface (WEDGE) 29.

Next, the details of the respective components constituting themultipurpose processing circuit block 10 shown in FIG. 4 will beexplained.

The central processing unit CPU 11 is a Z80 binary compatible fast CPUand is designed such that its bus cycle is changed from 4 clocks to 2clocks for an increase in speed and its operating frequency is alsoincreased, so that the CPU 11 operates at up to a maximum frequency of25 MHz.

The timing control unit 12 is a timing generator for conducting timingcontrol of the light projection LED 2 and the CCD image sensor 6 whichare shown in FIG. 3, the data converter (ADC) 13 for converting ananalog signal from the CCD image sensor 6 into a digital signal, thefirst calculation processor 14 and the second calculation processor 15for calculating the signal from the data converter 13, the inputaccumulation unit 20, and so on. It should be noted that, in the opticalinformation reading apparatus using laser light, a timing control unitfor controlling operations of the swinging mirror for scanning the laserlight, an A/D converter, a calculation unit for processing a signal fromthe A/D converter, an input accumulation unit, and so on corresponds tothe timing control unit 12.

The component that is the heart of the multipurpose processing circuitblock 10 and the most characteristic is the digital signal calculationunit (hereafter, called a “DSCU”) 17 composed of the first calculationprocessor 14, the second calculation processor 15, and the datacorrection section 16.

The DSCU 17 is a portion that generates bar code binarized data from thebar code data which has been A/D converted by the data converter 13, andan example thereof using an integration circuit as the first calculationprocessor 14 and a differentiation circuit as the second calculationprocessor 15 is explained here. As the DSCU 17, however, variouscircuits such as a moving average circuit, a circuit for generating barcode binarized data from bar code data by an FIR (finite impulseresponse) digital filter or an IIR (infinite impulse response) digitalfilter, and so on can be arbitrarily selected for use, in accordancewith the degree of variations in processing performance of the opticalinformation reading apparatus, the processing speed, the need for areduction in power consumption and so on, and the purpose.

In the DSCU 17, the first calculation processor 14 integrates data whichhas been produced by AID converting an output signal of the CCD imagesensor 6 by the data converter 13, and the second calculation processordifferentiates the integrated data to obtain a difference and comparesthe difference with a predetermined slice level to generate bar codebinarized data. Further, the data correction section 16 corrects thegenerated bar code binarized data and takes measures against noise, andthen outputs the corrected bar code binarized data to the inputaccumulation unit 20.

The details of the DSCU 17 will be explained later.

The input accumulation unit (input capture) 20, which has a function ofinputting a bar code binarized data signal from the DSCU 17 thereintoand stores it, comprises the controller for SRAM 18 for controllingaddresses of the SRAMs and a timing generator for writing calculateddata into the SRAMs, that is, the calculator for SRAM 19, captures datawhich has been corrected at regular time intervals by the datacorrection unit 16 of the DSCU 17, and automatically expands thecorrected data in each memory.

The data capturing memories are the SRAM(A) 21 and the SRAM(B) 22 whichare alternately used during capture operation. The CPU 11 cannot getaccess to the memory in capture operation. Accordingly, during operationof capturing into the SRAM 22, the CPU 11 cannot get access to the SRAM22 but can freely get access to the SRAM 21 which is not in captureoperation. The SRAM 21 and the SRAM 22 are areas where the bar codebinarized data is stored.

The SRAM(C) 23 is used for operation of the central processing unit CPU11. Addresses are about 4 K bytes from D000h to DFFFh.

The watchdog timer (WDT) 24, which is a timer monitoring abnormal valuesin terms of time, inputs/outputs respective characteristics and data andmanages abnormal values when inputting/outputting.

The programmable timer 25 comprises a 16-bit timer in which a frequencycan be set and an 8-bit timer for buzzer in which a frequency and a dutycan be set.

The UART (asynchronous serial communication transmitter/receivercircuit) 26, which is an interface to the CMOS 32 and the RS-232-Cdriver 33 shown in FIG. 3, is a 16550 compatible UART.

The serial interface (SCI) 27, which is an interface to the low-speedUSB adjuster 34 and the OCIA (optical coupled interface adopter) 35, isa three wire-type synchronous serial communication interface. The serialinterface (SCI) 27 is used for connecting with the low-speed USBadjuster 34, which is composed of, for example, a USB functioncontroller (UPD789800) manufactured by NEC, and the OCIA 35.

The serial interface for debug (DSCI) 28, which is a controller fordebugging, outputs in serial calculation results of the digital signalcalculation unit (DSCU) 17 or data in synchronism therewith inside themultipurpose processing circuit block 10. The output data is convertedinto an analog signal by an external D/A conversion circuit to be usedto observe at an external part the slice state of the DSCU 17 inside themultipurpose processing circuit block 10.

The interface (WEDGE) 29 is an interface for connecting with theexternal PC (personal computer) 36 and KB (keyboard) 37 shown in FIG. 3.

The I/O port (GPIO) 30 is a general-purpose I/O port for connecting withthe buzzer 38 and confirmation LED 39 shown in FIG. 3.

The details of the digital signal calculation unit (DSCU) 17 inside themultipurpose processing circuit block 10 shown in FIG. 4 will beexplained here with FIG. 5 to FIG. 10.

First, an example of the entire configuration of the DSCU 17 is shown inFIG. 5. The DSCU 17 includes, as main components, a reset section 53 anda noise reduction section 55 which are not shown in FIG. 4, in additionto the first calculation processor 14, the second calculation processor15, and the data correction section 16 which are shown also in FIG. 4.

Next, specific configuration examples of the respective components willbe explained with FIG. 6 to FIG. 10.

The first calculation processor 14, which forms an integration circuitas shown in FIG. 6, inputs thereinto digital data sent from the dataconverter 13 and sends the data by a shift register 58 to level buffers59 and 59′ for setting a level and to an offset buffer 60 for giving anoffset. The data passing through the level buffers 59 and 59′ areintegrated by an integrator 63. On the other hand, the data sent to theoffset buffer 60 further passes through a shift register 61, levelbuffers 62 and 62′ and integrated by an integrator 64. The dataintegrated by the integrators 63 and 64 are outputted to alater-described differentiator 65 of the second calculation processor15.

The first calculation processor 14 also includes a data P—P detectionsection 56. A data P—P detector 75 of the data P—P detection section 56detects a peak-to-peak value of the data from the shift register 58 andsends resulting data to a comparator 76, which compares the data withdata of an analog level at the time of generating the bar code binarizeddata to generate an FF reset signal and sends the signal to alater-described plurality of mask selection sections of the datacorrection section 16.

The second calculation processor 15 forms a differentiation circuit asshown in FIG. 7. The integrated data from the respective integrators 63and 64 of the first calculation processor 14 are inputted into thedifferentiator 65 and differentiated. A peak detector 66 detects a peakvalue of resulting differentiated data and sends the result to an FF(flip-flop circuit) 68.

Meanwhile, the differentiated data from the differentiator 65 iscaptured into a comparator 67. The comparator 67 compares thedifferentiated data with a signal at a high slice level and a signal ata low slice level, and outputs the comparison result to the FF 68.

The FF 68 generates bar code binarized data from the comparison resultfrom the comparator 67 and the data of the peak value from the peakdetector 66, and output the bar code binarized data to the reset section53 and a later-described counter 73 of the data correction section 16.

The reset section 53, which comprises a counter 71 and a comparator 72as shown in FIG. 8, estimates a state in which the bar code binarizeddata inputted from the FF 68 keeps a high level “H”, and forciblychanges (resets) the data to a low level “L” when the state continuesfor more than a set period, to return the data to the FF 68 of thesecond calculation processor 15. When the state does not continue formore than the set period, the reset section 53 sends the bar codebinarized data to a later-described FF 78 of the data correction section16.

The data correction section 16, which is composed as shown in FIG. 9,captures the bar code binarized data from the FF 68 of the secondcalculation processor 15 into a detector 74 via the counter 73, capturesthe FF reset signal from the data P—P detection section 56 of the firstcalculation processor 14, and passes both the data and the signalthrough a plurality of masks 77 and a plurality of FFs 78, so as tocorrect, to a low level, data at a high level of a portion of the barcode binarized data which has been generated in a state of the analoglevel being below a preset value. The bar code binarized data thuscorrected in the data correction section 16 is sent to the subsequentnoise reduction section 55.

The noise reduction section 55 comprises an edge detector 79, a counter80, and a comparator 81 as shown in FIG. 10. The edge detector 79detects the pulse width of the bar code binarized data sent from thedata correction section 16 and sends it to the counter 80. Then, thecomparator 81 compares a count data value of the counter 80 with a pulsewidth set value which has been preset in advance and erases data with apulse width of the set value or less. Corrected bar code binarized datathus corrected is sent to the input accumulation unit 20 shown in FIG.4.

Next, another configuration example of the digital signal calculationunit will be described with FIG. 11. Portions in FIG. 11 correspondingto those shown in FIG. 5 to FIG. 10 are assigned the same symbols andnumerals. Further, the illustration of many of the common portions isomitted or simplified.

The digital signal calculation unit shown in FIG. 11 comprises a firstcalculation processor 14 using an integration circuit, a secondcalculation processor 15 using a differentiation circuit, a datacorrection section 16, and a noise reduction section 55.

The first calculation processor 14 includes a noise filter 83 and ashift register 58 in addition to the respective portions shown in FIG.6, and eliminates an AC component from the input data from the dataconverter 13 in FIG. 4 to leave only the gradient of the edge of thesignal and sends resulting data to the second calculation processor 15and the data correction section 16.

The second calculation processor 15 composed of the differentiationcircuit includes a comparator 67 and a JK-FF 68, and outputs data madeby inverting the data generated by the first calculation processor 14 ata point where the data intersects an upper limit or a lower limit. Thedata becomes bar code binarized data.

More specifically, the comparator 67 compares the data from the firstcalculation processor 14 with a high slice level being the upper limitvalue and a low slice level being the lower limit value, and, inaccordance with the comparison result, the JK-FF 68 inverts the bar codebinarized data signal in such a manner that the signal changes to thehigh level when the data comes to have the upper limit value or higherand to the low level when the data comes to have the lower limit valueor lower. Between the high slice level and the low slice level,hysteresis is provided to keep the preceding state.

A differential expression at this time is expressed by the followingexpression using Δt, Δd, X_(n), and X_(n-1) shown in FIG. 12.Δd/Δt=(X _(n) −X _(n-1))/{n−(n−1)}

Besides, basic configurations of a sampling circuit and adifferentiation circuit at this time are the same as those of the firstcalculation processor 14 and the second calculation processor 15 shownin FIG. 6 and FIG. 7, but these configurations tend to pick up noise ofdata. Therefore, it was shown that the decoding ability significantlyimproves when the following functions were added to the configurations:

-   -   {circle around (1)} a function of varying the differential time        (Δt) in the differentiation circuit of the second calculation        processor 15;    -   {circle around (2)} a function of eliminating or reducing noise;    -   {circle around (3)} a function of minimizing the difference in        total data due to buffer selection;    -   {circle around (4)} a function of eliminating noise components        by comparison with an analog signal;    -   {circle around (5)} a function of erasing binary data with an        arbitrary pulse width or less; and    -   {circle around (6)} a function of forcibly resetting binary data        at a high level continuing for a predetermined length or longer.

Next, these six functions will be explained.

As for the function {circle around (1)} of varying the differential time(Δt), in order to provide frequency characteristics corresponding to theinput data to the first calculation processor 14, buffers respectivelystructured in two stages are provided between the first calculationprocessor 14 and the second calculation processor 15 so that the time(Δt) required for passing data from the front stage to the rear stagecan be selected.

As a result, the whole filter characteristics become a combination ofthe characteristics of a low-pass filter of the noise filter 83 and thecharacteristics of a high-pass filter by the variability of theaforementioned differential time (Δt), and thus serves as a function ofa band-pass filter. The characteristics of the high-pass filter are asshown in FIG. 13 in which the pass frequency band varies with Δt.

As for the function {circle around (2)} of coping with noise, sincenoise with a large gradient may be an object to be detected by thedifferentiation circuit of the second calculation processor 15, alow-pass filter as the noise filter 83 in FIG. 11 is provided at aposition preceding the shift register 58.

As a result, while noise appears in the analog state of data as shown ina part (a) of FIG. 14, no noise part appears at all in the bar codebinarized data as shown in a part (b) of FIG. 14, which shows that noinfluence of analog noise is exerted on the bar code binarized data.

The characteristics of the noise filter 83 at this time are as shown inFIG. 15 in which the pass frequency band varies with the number ofbuffers constituting the noise filter. The gradient of the inputwaveform decreases, but this decrease can be coped with by a function ofadjusting duration. As described above, it is possible to cope withvarious noises by making variable the frequency characteristics of thenoise filter 83 in FIG. 11.

Consequently, the characteristics of the high-pass filter of theforegoing {circle around (1)} (FIG. 13) and the characteristics of thelow-pass filter of {circle around (2)} (FIG. 15) are combined to providecharacteristics of a band-pass filter having variable pass frequencybands as shown in FIG. 16.

As for the function {circle around (3)} of minimizing the difference intotal data due to buffer selection, the low-pass filter section of theabove-described {circle around (2)} calculates the total data by anexpression for a total as follows:G(n)=Σ(n−k)

In this case, the total value tends to vary due to the coefficient k,and this state also affects the value of the differentiation (by thedifferentiator 65 in FIG. 7), so that the high slice level and the lowslice level in the second calculation processor 15 in FIG. 11 should besubstantially changed every time the coefficient is changed. Hence, withrespect to this coefficient, the total data is multiplied by n. Thereference at this time is the bit width of a maximum total number.

This configuration decreases the difference in the total output valuewith respect to the coefficient and eliminates the necessity of changingthe slice levels. The adjustment of the low-pass output at this time isimplemented by shift to the left as shown in FIG. 17.

As for eliminating or reducing noise {circle around (4)} by comparisonwith an analog signal, since noise which cannot be eliminated by aband-pass filter (pass band limit filter) often remains in the waveformof the bar code binarized data, a function of eliminating a datawaveform at a low input data level is necessary. Therefore, as in thedata correction section 16 shown in FIG. 11, in a comparison maskselection section 84 selects the data from the first calculationprocessor 14 and a data erase level from an external part, and a maskcircuit 85 masks and sends them to a shift buffer 78′ (corresponding toa circuit constituted by the FFs 78 in FIG. 9 connected in multiplestages).

Here, a portion with bar code binarized data at a high level but aninput data level at a low level (as compared with set values) is judgedto be noise, so that the waveform of the bar code binarized data isbrought to a low level. The diagram of a waveform forming the bar codebinarized data by comparison with the analog input data is as shown inFIG. 18. More specifically, the bar code binarized data (abbreviated asBBD in FIG. 18) is shaped, as it is, results in the fourth waveform (BBDbefore shaping). In contrast to this waveform, when the level of theinput data is compared so that data at a level below a fixed level iserased, the bar code binarized data results in the third waveform.

As for the function {circle around (5)} of erasing binary data with anarbitrary pulse width or less is implemented by the configuration of thenoise reduction section 55 shown in FIG. 10. Here, since noise at a highinput level is outputted to the bar code binarized data, the comparator81 has a function of erasing, based on an arbitrary pulse width setvalue, data with the set pulse width or less.

Further, the bar code binarized data with the set pulse width or less iskept at a level before change, whereby most of fine noises that will becaptured when a thick bar code or the like is read can be eliminated.This is illustrated as shown in FIGS. 19A and 19B. A part (a) of FIG. 19shows a waveform of the bar code binarized data before shaping. Incontrast to this, when data with a set pulse width W or less is notcounted, the waveform becomes a waveforms after shaping shown in a Part(b) of FIG. 19.

Next, as for the function {circle around (6)} of forcibly resetting datakeeping a state of a high level “H” continuing for a predeterminedlength or longer, this function is implemented by the reset section 53shown in FIG. 8. A differentiation circuit has a characteristic thatnoise having a steep gradient becomes high in output data level. Whenthe noise reaches the high slice level (upper limit threshold) shown inFIG. 7, a bar code binarized data waveform turns to the high level andnever returns to the preceding level until the noise drops to the lowslice level (lower limit threshold). However, the gradient is not enoughto drop down below the low slice level because it is noise, the highlevel is kept until a data portion.

Hence, a function of forcibly dropping to the low level after a lapse ofa fixed period is added. This eliminates the influence of noise on thedetection data by the detector 74 of the data correction section 16shown in FIG. 9. The above is as shown in FIG. 20. In FIG. 20, a part(a) shows a waveform of the input data containing noise components, apart (b) shows the relationship between a waveform of differentiateddata of the input data and the high slice level (upper limit threshold)and low slice level (lower limit threshold), a part (c) shows a waveformof the bar code binarized data (BBD) before shaping, and a part (d)shows a waveform of the bar code binarized data (BBD) after shaping.

Next, an embodiment using a moving average circuit as the firstcalculation processor 14 in FIG. 5 will be explained.

The moving average circuit basically has a function of a low-pass filterand thus has a characteristic of eliminating noise such as smallfrequency components to smooth a waveform.

FIG. 21 is a block diagram showing a basic circuit configuration of onlyportions corresponding to the first calculation processor 14 and thesecond calculation processor 15 in the digital signal calculation unitshown in FIG. 5 of a multipurpose processing circuit block in an opticalinformation reading apparatus.

In this embodiment, the first calculation processor 14 composed of theintegration circuit and the second calculation processor 15 composed ofthe differentiation circuit in the digital signal calculation unit 17are replaced with a first calculation processor 140 composed of a movingaverage circuit and a second calculation processor 150 composed of abinarization circuit, respectively, and the other portions of thedigital signal calculation unit (DSCU) are the same as those of thedigital signal calculation unit (DSCU) 17 in the above-describedembodiment.

The first calculation processor 140 shown in FIG. 21, which constitutesa moving average circuit and has a buffer selecting function, comprisesflip-flop circuits (FFs) 91 being a plurality of buffers, a plurality ofselection sections 92 and 93, and a SUB (adder) 94.

The second calculation processor 150, which constitutes a binarizationcircuit, comprises a comparator 67 and a JK-FF 68 with thedifferentiator 65 and the peak detector 66 in the second calculationprocessor 15 shown in FIG. 7 being omitted.

FIG. 22 shows the relationship between an original signal (input signal)OR and a signal MA made by multiplying the original signal by a movingaverage and bar code binarized data when the bar code binarized data isgenerated using the moving average circuit by the first calculationprocessor 140 and the second calculation processor 150 as shown in FIG.21. More specifically, the signal made by multiplying the waveform ofthe input signal by the moving average and the input signal arecompared, and when the input data>the moving average data, the bar codebinarized data is at high level, and when the input data<the movingaverage data, the bar code binarized data is at low level.

Although there are several ways of multiplying by the moving average,this embodiment uses a simple moving average and a weighted movingaverage, and therefore those will be explained.

The simple moving average is expressed by the following expression:${y\lbrack n\rbrack} = {\frac{1}{M + 1}{\sum\;{x\left\lbrack {n + k} \right\rbrack}}}$

In this expression, k denotes a index, and a block configuration diagramillustrating the principle of the simple moving average when k=−M/2˜M/2is shown in FIG. 23.

In the drawing, k is of a past type when the sampling point is anegative number, and is of a future type when the sampling point is apositive number.

Typically, a bar code reader including the moving average circuitsection tends to include much noise in bar code binarized data, as adecoder of the bar code reader, and therefore the following functions orconfigurations are added in this embodiment:

-   -   (1) a function of changing the moving average sampling width;    -   (2) employment of a weighted moving average method;    -   (3) separation of the moving average circuit into two parts;    -   (4) a function of changing the weighted amount of the weighted        moving average;    -   (5) a function of changing frequency response of the weighted        moving average;    -   (6) a function of selecting a maximum/minimum value in moving        average sample data;    -   (7) a function of thinning out moving average sample data;    -   (8) a function of interpolating moving average sample data;    -   (9) a function of reducing the total of high frequency        components from the total of low frequency components in the        weighted moving average; and    -   (10) a function of changing M (a total number divisor) of        weighted moving average.

First, the function (1) of changing the moving average sampling widthwill be explained.

As shown in FIG. 21, the first calculation processor 140 constitutingthe moving average circuit having the buffer selecting function capturesthe input data (DATA) in sequence into the FFs 91 being the plurality ofbuffers. The selection sections 92 and 93 select necessary data fromamong the data captured into each of the FFs 91 and send them to the SUB(adder) 94, and the SUB 94 sends the selected data out to the secondcalculation processor 150 that performs a subsequent processing process.

The changing the moving average sampling width means changing thefrequency characteristics of a filter in accordance with the frequencycomponent of the input data, and the changing can be coped with bychanging the value of k in the above-described moving average expressionand is coped with, in the circuit, by selecting an arbitrary pointwithout changing the total number of buffers (FFs). This embodiment cancope with various frequencies in the above-described manner.

Next, as for the employment (2) of a weighted moving average method,this method is expressed by the following expression, and a blockconfiguration diagram illustrating the principle of the weighted movingaverage is shown in FIG. 24.${y\lbrack n\rbrack} = {\frac{1}{N}{\sum\limits_{k = {- \frac{M}{2}}}^{\frac{M}{2}}\;{a_{k}{x\left\lbrack {n + k} \right\rbrack}}}}$$N = {\sum\limits_{k = {- \frac{M}{2}}}^{\frac{M}{2}}a_{k}}$

The employment of this method enables removal of external factorsincluded in the waveform of the input data, for example, a gradient andso on. Further, various frequency components are combined by pairingmoving average expressions, whereby a filter can be produced which issuitable for characteristics of an input waveform.

The point to note in this embodiment is that processing at a subsequentstage can be swiftly performed by making a power of two vertically at anindividual point.

Next, as for the structure (3) of the moving average circuit separatedin two parts, this is implemented by constituting a moving averagecircuit of a front stage moving average circuit 96 comprising threebuffers (FFs) and a rear stage moving average circuit 97 comprising twobuffers (FFs), as shown in a first calculation processor 141 in FIG. 25.

Here, a front stage moving average is expressed by the following upperexpression, and a rear stage moving average is expressed by thefollowing lower expression.$Y_{0} = \frac{\left( {X_{- 1} + X_{0} + X_{+ 1}} \right)}{3}$$Z_{0} = {\frac{\left( {Y_{- 1} + Y_{0}} \right)}{2} = \frac{\frac{\left( {X_{- 2} + X_{- 1} + X_{0}} \right)}{3} + \frac{\left( {X_{- 1} + X_{0} + X_{+ 1}} \right)}{3}}{2}}$

Since the circuit tends to increase in size when the moving average ismade to suit to low frequency characteristics, the filter circuitconfiguration is changed. In this case, rather than use of a filterincluding five buffers (FFs), use of filters, in combination, in whichthe five buffers are divided into three buffers and two buffers,provides increased effect due to the combination. The expression of therear stage moving average clearly shows that this circuit has the samefunction as that of a circuit having six buffers, thus providing anadvantage that the circuit can be substantially reduced in size.

The addition of the function (4) of changing the weighted amount in theweighted moving average method is explained next. An expression ofweighted amount change at this time is expressed by the followingexpression.${y(i)} = \frac{{\sum\limits_{j = 0}^{N}\;{x\left( {n + j} \right)}} + {a{\sum\limits_{k = 0}^{M}\;{x\left( {n + k} \right)}}}}{N + {aM}}$

When the input data itself is at low level and its waveform isdistorted, the waveform has no follow-up property, and therefore thisfunction is added which changes the weighted amount to improve thefollow-up property. As a result of this, a portion of data at low levelratio reaches a threshold level, so that the waveform also follows upnoise, and therefore this function is used together with the function(5) of changing frequency response explained later.

The addition of the function of changing the weighted amount results inthat when an input signal (original signal) OR and a signal MA made bymultiplying the input signal OR by the weighted moving average beforechanging the weighted amount have waveform characteristics as shown inFIG. 26, the input signal OR and the signal MA made by multiplying theinput signal OR by the weighted moving average after changing theweighted amount have waveform characteristics as shown in FIG. 27.

Next, as for the addition of (5) the function of changing frequencyresponse in the weighted moving average method, the function of changingfrequency response, which is partially explained in the above paragraphof the function (4) of changing the weighted amount, is a function ofeliminating noise, fluctuation, and so on.

An expression of frequency response change is expressed by the followingexpression.${y(i)} = \frac{{\sum\limits_{j = 0}^{N}\;{x\left( {n + j} \right)}} + {\sum\limits_{k = 0}^{M}\;{x\left( {n + k} \right)}}}{N + M}$

This function changes the frequency response of the filter in order torespond to characteristics of waveforms since the input data includesmixed waveforms with various frequency characteristics. This functioneliminates noise, fluctuation, and so on. The addition of this functionresults in that when an input signal (original signal) OR and a signalMA made by multiplying the input signal OR by the weighted movingaverage before changing the frequency characteristics have waveformcharacteristics as shown in FIG. 28, the input signal OR and the signalMA made by multiplying the input signal OR by the weighted movingaverage after changing the frequency characteristics have waveformcharacteristics as shown in FIG. 29.

Next, as for the addition of the function (6) of selecting amaximum/minimum value in sample data, this function is added as ameasure to cope with a singular point which is susceptible to the movingaverage expression.

In the method in use here, a maximum value max(n) and a minimum valuemin(n) are obtained by the following expressions, and a maximum orminimum point among n pieces is employed, whereby the influence on thesingular point (noise) in the sample data is eliminated.${\max(n)} = {\underset{k = 0}{\overset{n}{MAX}}\;{x\left( {n + k} \right)}}$${\min(n)} = {\underset{k = 0}{\overset{n}{MIN}}\;{x\left( {n + k} \right)}}$

Here, the maximum value/minimum value is selected in accordance with thecharacteristics of the input data OR. When this is illustrated by awaveform, the waveform passing through a maximum value circuit is asshown by a broken line in FIG. 30, and the waveform passing through aminimum value circuit is as shown by a broken line in FIG. 31. In thesedrawings, OR denotes the input data, MA a signal made by multiplying ORby the weighted moving average, max a maximum value, and min a minimumvalue.

Next, the addition of the function (7) of thinning out sample data isexplained. This is a function of reducing the number of pixels per unitlength, and its concept is shown in FIG. 32.

This function provides an effect similar to that of a CCD scanner with areduced resolution. This function theoretically means sampling withskips at arbitrary data intervals, and is effective for a low-resolutionbar code reader.

As for the addition of the function (8) of interpolating moving averagesample data, this function artificially inserts interpolating databetween data to increase the resolution since the pulse width of the barcode binarized data slightly varies in Narrow/Wide ratio because of agreat influence by the sampling rate. An interpolating expression isexpressed by the following expressions, and the interpolating data ismade by adding prior and subsequent data and dividing the resulting databy two.${y(h)} = {\frac{1}{2}\left( {{y(n)} + {y\left( {n - 1} \right)}} \right)}$$h = {n - \frac{1}{2}}$

The influence of this sampling rate exerted on the bar code binarizeddata is as shown in FIG. 33, in which a sample part becomes closer tothe cross point, so that the width of the bar code binarized data can betaken more accurately. In FIG. 33, black circles denote normal points,and triangles denote interpolated points.

Next, as for the addition of the function (9) of reducing the total ofhigh frequency components from the total of low frequency components inthe weighted moving average method, when data itself changes little inamount, noise may occurs even if the threshold level is moved, and, inthis case, this function reduces the total data of a high frequency fromthat of a low frequency. This reduction makes only the high frequencycomponents have a waveform in a reverse phase while the low frequencycharacteristics are maintained.

The waveform when a highly weighting stage is added is expressed byy(n)=(y1+y2y3+y4)/total number of pointsand a signal MA made by multiplying an original signal OR by theweighted moving average has a waveform as shown in FIG. 34.

The waveform when the highly weighting stage is reduced is expressed byy(n)={(y1+y2)−(y3+y4)}/total number of pointsand a signal MA made by the original signal OR by the weighted movingaverage has a waveform as shown in FIG. 35.

Finally, the addition of the function (10) of changing M (a totaldivisor) of weighted moving average is explained. When there are manysingular points (noises) in bar code data with a large width, thesingular points intersect the threshold levels to exert adverse effecton the waveform, and therefore for prevention of the effect, thisfunction increases the coefficient M at this time to be larger than theactual total number, whereby the moving average value decreases inthreshold width and the singular points become closer to the middle ofthe input data amplitude, so that a position where the data intersectsthe threshold level is not affected by the singular points.

Here, waveforms in accordance with changes of the coefficient M are asshown in FIG. 36. In this drawing, ID shows the waveform of the inputdata, MA1 the waveform of a signal made by multiplying the input data bythe weighted moving average when the total divisor is a real number, andMA2 the waveform of a signal made by multiplying the input data by theweighted moving average when the total divisor is doubled.

The optical information reading apparatus including the multipurposeprocessing circuit block according to the invention has been described,and the details of the configuration and function of the digital signalcalculation unit thereof have been explained in particular.

Further, the specific configuration examples, their operations, variousadditional functions, and so on of the first calculation processor andthe second calculation processor, in particular, in the configuration ofthe digital signal calculation unit have been explained. As embodimentsof the unit, the example using a differentiation circuit and the exampleusing a moving average circuit have been described, and, in addition tothese, it is also possible to configure the digital signal calculationunit using an FIR (finite impulse response) digital filter or using IIR(infinite impulse response) digital filter, as the first calculationprocessor.

Though the configuration in which the multipurpose processing circuitblock including the central processing unit is formed on the singlesubstrate has been described in each of the above embodiments, it is notdenied that even an optical information reading apparatus having aconfiguration in which only the central processing unit is separatelyconfigured, or a part of the above-described multipurpose processingcircuit block is separately formed can be an embodiment of the inventionas long as the apparatus has a configuration with no difference inobject and effect of the invention.

INDUSTRIAL APPLICABILITY

As has been described, in the optical information reading apparatusaccording to the invention, processing circuits such as the ADconversion circuit, the binarization processing circuit, the decoder,the interface, and so on are formed on a single substrate to constitutea multipurpose processing circuit, through use of which the opticalinformation reading apparatus obtains the following effects.

(1) Variations in processing performance can be eliminated with noinfluence of variable factors such as a change in amplification rate,temperature, and so on. This is shown in the drawings as follows.Hereinafter, in each drawing, analog bar code data is shown by BCD, andbar code binarized data is shown by BBD.

-   {circle around (1)} Influences by high and low amplification rates    on the bar code binarized data are as illustrated by waveforms that    are respectively shown    -   a) in FIG. 37 when the amplification rate is high, and    -   b) in FIG. 38 when the amplification rate is low,        in which a remarkable effect is obtained. More specifically, the        bar code data is large when the amplification rate is high, and        the bar code data is small when the amplification rate is low,        but both the bar code binarized data which have been subjected        to calculation processing using the processing circuit of the        invention have the same size and no variations.-   {circle around (2)} Influences by temperature changes on the bar    code binarized data are as illustrated by waveforms that are    respectively shown    -   a) in FIG. 39 in the case of a high temperature (+45° C.), and    -   b) in FIG. 40 in the case of a low temperature (−5° C.),        in which a remarkable effect is obtained. More specifically, the        bar code data is relatively small in the case of a high        temperature, and the bar code data is large in the case of a low        temperature, but both the bar code binarized data which have        been subjected to calculation processing using the processing        circuit of the invention have the same size and no variations.

(2) The processing ability is improved which is not affected by theprinting quality (gradation or the like) of a bar code symbol, and novariations occur in the bar code binarized data.

The obtained waveforms are shown

-   -   a) in FIG. 41 when the printing density is low, and    -   b) in FIG. 42 when the printing density is high,        which shows that even if there is gradation in the printing        quality of the bar code symbol and bar code data has thus        variations, both the bar code binarized data which have been        subjected to calculation processing using the processing circuit        of the invention become data having the same size and no        variations.

(3) Selection of the calculation processing method enables arbitrary andeasy selection from among various digital processing methods inaccordance with a purpose, and realizes an increase in speed ofprocessing ability.

(4) A reduction in size, price, and power consumption of the entireoptical information reading apparatus are realized.

1. An optical information reading apparatus, comprising: a lightprojection means for projecting light to an object to be read havingportions with different light reflectances; a reflector for deflectingthe reflected light from the object to be read; an imaging opticalsystem for forming an image of deflected light by the reflector a lightreceiving position; a photoelectric conversion means located at thelight receiving position for photoelectrically converting the image madeof the deflected light and outputting an electric signal; and acalculation means for calculating the electric signal outputted fromsaid photoelectric conversion means and outputting bar code binarizeddata indicating information of the object to be read; said calculationmeans forms a multipurpose processing circuit by integrally providing,on a single substrate; a data converter for converting the electricsignal into a digital signal; a digital signal calculation unit having acalculation processor for calculating the digital signal converted bysaid data converter and generating bar code binarized data, a datacorrection section for correcting the bar code binarized data, and anoise reduction section for reducing noises, for outputting the bar codebinarized data indicating information of the object to be read; an inputaccumulation unit for accumulating the bar code binarized data outputfrom said digital signal calculation unit; and a timing control unit forcontrolling operation timings of said light projection means, saidphotoelectric conversion means, said data converter, said digital signalcalculation unit, and said input accumulation unit.
 2. The opticalinformation reading apparatus according to claim 1, wherein saidmultipurpose processing circuit is integrally formed on the singlesubstrate while also including a central processing unit (CPU) forcentrally controlling respective units of said calculation means.
 3. Theoptical information reading apparatus according to claim 1, wherein saidcalculation unit comprises: a first calculation processor forcalculating the digital signal converted by said data converter; and asecond calculation processor for generating the bar code binarized datafrom data calculated by said first calculation processor.
 4. The opticalinformation reading apparatus according to claim 3, wherein: said firstcalculation processor has an offset buffer to give an offset to thedigital signal, and two integrators for integrating respectively saiddigital signal and a digital signal given the offset by the offsetbuffer through a shift register; and said second calculation processorcomprises a differentiator for differentiating an integrated data outputfrom two integrators and a binarization circuit for generating the barcode binarized data from a differentiated data output from theintegrators.
 5. The optical information reading apparatus according toclaim 4, wherein means for varying a differential time (Δt) in thedifferentiator of said second calculation processor is provided.
 6. Theoptical information reading apparatus according to claim 4, wherein saidfirst calculation processor is provided with a low-pass filter in frontof the shift register as a noise filter for eliminating or reducingnoises of the digital signal.
 7. The optical information readingapparatus according to claim 4, wherein the data correction section hasa function of eliminating a part being a data erase level or less of aninput data into said second calculation processor out of the bar codebinarized data generated by said second calculation processor.
 8. Theoptical information reading apparatus according to claim 4, wherein saidnoise reduction section has a function of erasing a pals being set palswidth or less from the bar code binarized data and keeping at levelbefore change.
 9. The optical information reading apparatus according toclaim 4, wherein a reset section for forcibly resetting binarized datakeeping a state of a high level “H” continuing for a predeterminedlength or longer out of the bar code binarized data generated in saidsecond calculation processor is provided.
 10. The optical informationreading apparatus according to claim 3, wherein: said first calculationprocessor comprises a moving average circuit for generating a movingaverage data from said moving digital signal; and said secondcalculation processor comprises a binarization circuit for generatingthe bar code binarized data using the moving average data.
 11. Theoptical information reading apparatus according to claim 10, wherein themoving average circuit of said first calculation processor comprisesplural flip-flop circuits for capturing said digital signal sequentiallyand plural selection sections for selection necessary data out ofcaptured data into each flip-flop circuit, and an adder for adding theselected data by the selection sections.
 12. The optical informationreading apparatus according to claim 10, wherein said moving averagecircuit is a weighted moving average circuit.
 13. The opticalinformation reading apparatus according to claim 12, wherein said movingaverage circuit has means for changing weighted amount of said weightedmoving average circuit.
 14. The optical information reading apparatusaccording to claim 12, wherein said moving average circuit has means forchanging frequency response of said weighted moving average circuit. 15.The optical information reading apparatus according to claim 12, whereinsaid moving average circuit has means for reducing a total of highfrequency components from a total of low frequency components in weightaverage by said weighted moving average circuit.
 16. The opticalinformation reading apparatus according to claim 10, wherein said movingaverage circuit is comprised of a front stage moving average circuit anda rear stage moving average circuit separately.